import request from '#/utils/requestAbort';

// 省份-交易中心-场站（数据权限）
export async function queryMarketList(menuCode) {
  return request(`/power/dataPower/common/${menuCode}/t_station`, {
    method: 'GET',
  });
}
// 绿证筛选数据
export async function queryParamConfig() {
  return request('/tianji-transaction/greenCertificateManagement/queryParamConfig', {
    method: 'GET',
  });
}
// 聚合数据
export async function greenCertificateAnalysis(data, order) {
  const { projectType: electricityType, ...arg } = data;
  return request('/tianji-transaction/greenCertificateManagement/greenCertificateAnalysis', {
    method: 'POST',
    data: {
      greenCertificateOverviewReqBody: { ...arg, electricityType },
      gatherBody: {
        order,
        orderSize: 5,
        timeOrder: 0,
        headType: 1,
      },
    },
  });
}
